<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>tnef.rtfparser</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="tnef-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

      <th class="navbar" width="100%"></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        <a href="tnef-module.html">Package&nbsp;tnef</a> ::
        Module&nbsp;rtfparser
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="tnef.rtfparser-module.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== MODULE DESCRIPTION ==================== -->
<h1 class="epydoc">Module rtfparser</h1><p class="nomargin-top"><span class="codelink"><a href="tnef.rtfparser-pysrc.html">source&nbsp;code</a></span></p>
<p>The module implements a pyparsing - based special-purpose RTF parser 
  specifically for extracting HTML from RTF contained within a TNEF 
  attachment.</p>

<!-- ==================== CLASSES ==================== -->
<a name="section-Classes"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Classes</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Classes"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="tnef.rtfparser.RTFParserException-class.html" class="summary-name">RTFParserException</a><br />
      indicate failed RTF parsing
    </td>
  </tr>
</table>
<!-- ==================== FUNCTIONS ==================== -->
<a name="section-Functions"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Functions</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Functions"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="parse"></a><span class="summary-sig-name">parse</span>(<span class="summary-sig-arg">rtfstring</span>)</span><br />
      return parse result as string</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="tnef.rtfparser-pysrc.html#parse">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="extract_html_line"></a><span class="summary-sig-name">extract_html_line</span>(<span class="summary-sig-arg">rtfline</span>)</span><br />
      extract a single line of HTML embedded in RTF</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="tnef.rtfparser-pysrc.html#extract_html_line">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="extract_html_lines"></a><span class="summary-sig-name">extract_html_lines</span>(<span class="summary-sig-arg">rtffile</span>)</span><br />
      extract a full HTML document embedded in RTF</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="tnef.rtfparser-pysrc.html#extract_html_lines">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="write_html_document"></a><span class="summary-sig-name">write_html_document</span>(<span class="summary-sig-arg">sourcefilename</span>,
        <span class="summary-sig-arg">htmlfilename</span>)</span><br />
      convenience for writing html out from rtf</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="tnef.rtfparser-pysrc.html#write_html_document">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
</table>
<!-- ==================== VARIABLES ==================== -->
<a name="section-Variables"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Variables</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Variables"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="tnef.rtfparser-module.html#htmchars" class="summary-name" onclick="show_private();">htmchars</a> = <code title="'0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ!&quot;#$%&amp;\\
'()*+,-./:;=?@[]^_`|~ \t'"><code class="variable-quote">'</code><code class="variable-string">0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMN</code><code class="variable-ellipsis">...</code></code>
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="SEP"></a><span class="summary-name">SEP</span> = <code title="&quot;;&quot;">&quot;;&quot;</code>
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="BRCKT_L"></a><span class="summary-name">BRCKT_L</span> = <code title="&quot;{&quot;">&quot;{&quot;</code>
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="BRCKT_R"></a><span class="summary-name">BRCKT_R</span> = <code title="&quot;}&quot;">&quot;}&quot;</code>
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="BRCKT"></a><span class="summary-name">BRCKT</span> = <code title="Bracket">Bracket</code>
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="CTRL_LABEL"></a><span class="summary-name">CTRL_LABEL</span> = <code title="Combine:({W:(abcd...) [W:(0123...)]})">Combine:({W:(abcd...) [W:(0123...)]})</code>
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="BASE_CTRL"></a><span class="summary-name">BASE_CTRL</span> = <code title="BaseControl">BaseControl</code>
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="HTM_CTRL"></a><span class="summary-name">HTM_CTRL</span> = <code title="HtmlControl">HtmlControl</code>
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="RTF_CTRL"></a><span class="summary-name">RTF_CTRL</span> = <code title="Control">Control</code>
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="RTFCODE"></a><span class="summary-name">RTFCODE</span> = <code title="{{Control | Bracket}}...">{{Control | Bracket}}...</code>
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="HTM_CTRL_NEWLINE"></a><span class="summary-name">HTM_CTRL_NEWLINE</span> = <code title="{Suppress:(HtmlControl) &quot;\par&quot;}">{Suppress:(HtmlControl) &quot;\par&quot;}</code>
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="HTM_CTRL_EMPTY"></a><span class="summary-name">HTM_CTRL_EMPTY</span> = <code title="{Suppress:(HtmlControl) W:( )}">{Suppress:(HtmlControl) W:( )}</code>
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="HTM_TXT"></a><span class="summary-name">HTM_TXT</span> = <code title="{W:(0123...)}...">{W:(0123...)}...</code>
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="tnef.rtfparser-module.html#HTM_CTRL_CONTENT" class="summary-name" onclick="show_private();">HTM_CTRL_CONTENT</a> = <code title="{{Suppress:(HtmlControl) Suppress:([&quot;}&quot;])} {W:(0123...)}...}">{{Suppress:(HtmlControl) Suppress:([&quot;}&quot;])} <code class="variable-ellipsis">...</code></code>
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="HTM_TAG"></a><span class="summary-name">HTM_TAG</span> = <code title="HtmlTag">HtmlTag</code>
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="tnef.rtfparser-module.html#HTM_TAG_PLUS_CONTENT" class="summary-name" onclick="show_private();">HTM_TAG_PLUS_CONTENT</a> = <code title="{HtmlTag [{Suppress:(&quot;}&quot;) {W:(0123...)}...}]}">{HtmlTag [{Suppress:(&quot;}&quot;) {W:(0123...)}<code class="variable-ellipsis">...</code></code>
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="HTM_CONTENT_IND"></a><span class="summary-name">HTM_CONTENT_IND</span> = <code title="Suppress:(&quot;\htmlrtf0 &quot;)">Suppress:(&quot;\htmlrtf0 &quot;)</code>
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="HTM_CONTENT"></a><span class="summary-name">HTM_CONTENT</span> = <code title="Html content">Html content</code>
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="RTFLINK"></a><span class="summary-name">RTFLINK</span> = <code title="{{Suppress:(&quot;HYPERLINK &quot;&quot;) W:(0123...)} Suppress:(&quot;&quot;&quot;)}">{{Suppress:(&quot;HYPERLINK &quot;&quot;) W:(0123...)} Suppress:(&quot;&quot;&quot;)}</code>
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="tnef.rtfparser-module.html#RTF" class="summary-name" onclick="show_private();">RTF</a> = <code title="{{{{{{{{{Suppress:(HtmlControl) Suppress:([&quot;}&quot;])} {W:(0123...)}...} | \
{HtmlTag [{Suppress:(&quot;}&quot;) {W:(0123...)}...}]}} | Html content} | {Supp\
ress:(HtmlControl) &quot;\par&quot;}} | Suppress:({{Suppress:(&quot;HYPERLINK &quot;&quot;) W:(\
0123...)} Suppress:(&quot;&quot;&quot;)})} | Suppress:(Control)} | Suppress:(Bracket)\
}}...">{{{{{{{{{Suppress:(HtmlControl) Suppress:([&quot;}&quot;])} {W:(01<code class="variable-ellipsis">...</code></code>
    </td>
  </tr>
</table>
<!-- ==================== VARIABLES DETAILS ==================== -->
<a name="section-VariablesDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Variables Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-VariablesDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="htmchars"></a>
<div class="private">
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <h3 class="epydoc">htmchars</h3>
  
  <dl class="fields">
  </dl>
  <dl class="fields">
    <dt>Value:</dt>
      <dd><table><tr><td><pre class="variable">
<code class="variable-quote">'</code><code class="variable-string">0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ!&quot;#$%&amp;\</code><span class="variable-linewrap"><img src="crarr.png" alt="\" /></span>
<code class="variable-string">'()*+,-./:;=?@[]^_`|~ \t</code><code class="variable-quote">'</code>
</pre></td></tr></table>
</dd>
  </dl>
</td></tr></table>
</div>
<a name="HTM_CTRL_CONTENT"></a>
<div class="private">
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <h3 class="epydoc">HTM_CTRL_CONTENT</h3>
  
  <dl class="fields">
  </dl>
  <dl class="fields">
    <dt>Value:</dt>
      <dd><table><tr><td><pre class="variable">
{{Suppress:(HtmlControl) Suppress:([&quot;}&quot;])} {W:(0123...)}...}
</pre></td></tr></table>
</dd>
  </dl>
</td></tr></table>
</div>
<a name="HTM_TAG_PLUS_CONTENT"></a>
<div class="private">
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <h3 class="epydoc">HTM_TAG_PLUS_CONTENT</h3>
  
  <dl class="fields">
  </dl>
  <dl class="fields">
    <dt>Value:</dt>
      <dd><table><tr><td><pre class="variable">
{HtmlTag [{Suppress:(&quot;}&quot;) {W:(0123...)}...}]}
</pre></td></tr></table>
</dd>
  </dl>
</td></tr></table>
</div>
<a name="RTF"></a>
<div class="private">
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <h3 class="epydoc">RTF</h3>
  
  <dl class="fields">
  </dl>
  <dl class="fields">
    <dt>Value:</dt>
      <dd><table><tr><td><pre class="variable">
{{{{{{{{{Suppress:(HtmlControl) Suppress:([&quot;}&quot;])} {W:(0123...)}...} | <span class="variable-linewrap"><img src="crarr.png" alt="\" /></span>
{HtmlTag [{Suppress:(&quot;}&quot;) {W:(0123...)}...}]}} | Html content} | {Supp<span class="variable-linewrap"><img src="crarr.png" alt="\" /></span>
ress:(HtmlControl) &quot;\par&quot;}} | Suppress:({{Suppress:(&quot;HYPERLINK &quot;&quot;) W:(<span class="variable-linewrap"><img src="crarr.png" alt="\" /></span>
0123...)} Suppress:(&quot;&quot;&quot;)})} | Suppress:(Control)} | Suppress:(Bracket)<span class="variable-linewrap"><img src="crarr.png" alt="\" /></span>
}}...
</pre></td></tr></table>
</dd>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="tnef-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

      <th class="navbar" width="100%"></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0.1 on Fri May 23 20:36:20 2008
    </td>
    <td align="right" class="footer">
      <a target="mainFrame" href="http://epydoc.sourceforge.net"
        >http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie();
  // -->
</script>
</body>
</html>
